<?php if ($links) { ?>
<ul class="pagination pagination-sm no-margin pull-right">
        <?php foreach ($links as $link) { ?>
            <?php if ($link['type'] == 'link') { ?>
                <?php if ($link['is_current']) { ?>
                    <li><span class="current"><?php echo $link['text']; ?></span></li>
                <?php } else { ?>
                    <li><a href="<?php echo $link['href'];?>"><?php echo $link['text']; ?></a></li>
                <?php } ?>
            <?php } else { ?>
                <li><span class="ghost"><?php echo $link['text']; ?></span></li>
            <?php } ?>
        <?php } ?>
</ul>
<?php } ?>